using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;

namespace ILRuntime.Runtime.Generated
{
    unsafe class UIKit_UITextField_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            Type[] args;
            Type type = typeof(UIKit.UITextField);
            args = new Type[]{typeof(System.String)};
            method = type.GetMethod("set_Placeholder", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_Placeholder_0);
            args = new Type[]{typeof(UIKit.UIFont)};
            method = type.GetMethod("set_Font", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_Font_1);
            args = new Type[]{typeof(UIKit.UITextAutocapitalizationType)};
            method = type.GetMethod("set_AutocapitalizationType", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_AutocapitalizationType_2);
            args = new Type[]{typeof(UIKit.UITextAutocorrectionType)};
            method = type.GetMethod("set_AutocorrectionType", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_AutocorrectionType_3);
            args = new Type[]{typeof(System.Boolean)};
            method = type.GetMethod("set_SecureTextEntry", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_SecureTextEntry_4);
            args = new Type[]{typeof(UIKit.UIReturnKeyType)};
            method = type.GetMethod("set_ReturnKeyType", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_ReturnKeyType_5);
            args = new Type[]{typeof(UIKit.IUITextFieldDelegate)};
            method = type.GetMethod("set_Delegate", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_Delegate_6);
            args = new Type[]{};
            method = type.GetMethod("get_Text", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, get_Text_7);
            args = new Type[]{typeof(UIKit.UIColor)};
            method = type.GetMethod("set_TextColor", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_TextColor_8);
            args = new Type[]{typeof(UIKit.UITextBorderStyle)};
            method = type.GetMethod("set_BorderStyle", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_BorderStyle_9);
            args = new Type[]{typeof(Foundation.NSAttributedString)};
            method = type.GetMethod("set_AttributedPlaceholder", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_AttributedPlaceholder_10);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* set_Placeholder_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.String @value = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Placeholder = value;

            return __ret;
        }

        static StackObject* set_Font_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UIKit.UIFont @value = (UIKit.UIFont)typeof(UIKit.UIFont).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Font = value;

            return __ret;
        }

        static StackObject* set_AutocapitalizationType_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UIKit.UITextAutocapitalizationType @value = (UIKit.UITextAutocapitalizationType)typeof(UIKit.UITextAutocapitalizationType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.AutocapitalizationType = value;

            return __ret;
        }

        static StackObject* set_AutocorrectionType_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UIKit.UITextAutocorrectionType @value = (UIKit.UITextAutocorrectionType)typeof(UIKit.UITextAutocorrectionType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.AutocorrectionType = value;

            return __ret;
        }

        static StackObject* set_SecureTextEntry_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Boolean @value = ptr_of_this_method->Value == 1;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SecureTextEntry = value;

            return __ret;
        }

        static StackObject* set_ReturnKeyType_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UIKit.UIReturnKeyType @value = (UIKit.UIReturnKeyType)typeof(UIKit.UIReturnKeyType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.ReturnKeyType = value;

            return __ret;
        }

        static StackObject* set_Delegate_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UIKit.IUITextFieldDelegate @value = (UIKit.IUITextFieldDelegate)typeof(UIKit.IUITextFieldDelegate).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Delegate = value;

            return __ret;
        }

        static StackObject* get_Text_7(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Text;

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static StackObject* set_TextColor_8(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UIKit.UIColor @value = (UIKit.UIColor)typeof(UIKit.UIColor).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.TextColor = value;

            return __ret;
        }

        static StackObject* set_BorderStyle_9(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UIKit.UITextBorderStyle @value = (UIKit.UITextBorderStyle)typeof(UIKit.UITextBorderStyle).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.BorderStyle = value;

            return __ret;
        }

        static StackObject* set_AttributedPlaceholder_10(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            Foundation.NSAttributedString @value = (Foundation.NSAttributedString)typeof(Foundation.NSAttributedString).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UIKit.UITextField instance_of_this_method = (UIKit.UITextField)typeof(UIKit.UITextField).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.AttributedPlaceholder = value;

            return __ret;
        }


        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new UIKit.UITextField();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
